<div class="image" style="position:relative;" >
  <% new_or_existing = image.new_record? ? 'new' : 'existing' %>
  <% prefix = "complaint[#{new_or_existing}_images][]" %>
  <div class="fakeupload">
    <label style="display:inline-block;width:16%">Image</label>
    <input type="text" name="fakeupload" size="30" />
  </div>
  <% fields_for prefix, image do |image_form| -%>
    <%= image_form.file_field :uploaded_data,:class=>"realupload",:size=>20, :onChange=>"this.form.fakeupload.value=this.value" -%>
    <label for="name">Name</label><%= image_form.text_field :name -%>
    <span class="task"><%= link_to_function "remove" , "$(this).up('.image').remove()", :style=>"position:absolute;top:0px;right:3px;" %></span>
  <% end -%>
</div>
